set

R  region/
$include ..\define/region17.set
WLD
*OECD90,REF,MAF,LAM
*Industrial,Transition,Developing
/
Y/2005,2050/
SSP/SSP1,SSP2,SSP3/
Sgcm/hg2e,ge2m,ipsl,mes_,ne1m,nocc/
Srcp/RCP26,RCP45,RCP60,RCP85,nocc/
co2fert/co2,noco2,nocc/
SYR /2040*2060,nocc/
N /N0*N100/
SCENARIO
*SCENARIO/
*$include ../define/scenario.set
*/
var/
PPOP_UNSH
PCAL
YIELD
/
A       /PDR,WHT,GRO,OSD,dum,CALL/
SCENARIO /SSP2_BaU_NoCC/
value/value/
;

parameter
        POP(SCENARIO,Y,R)               Population ratio of undernutrition [billion]
        PCAL_POP_ABS(SCENARIO,Y,R,A)    Per-capita calorie intake [kcal per person per day]
        dPCAL(R,Srcp,co2fert)           Shortage of food calorie [kcal per person per day]
        dPCAL_TOT(R,Srcp,co2fert)               Total shortage of food calorie [kcal per year]
        GJ_kcal

;

GJ_kcal=4184/10**9;

$gdxin '../data/final_results.gdx'
$load POP PCAL_POP_ABS


parameter
PCAL_5perc(R,Srcp,co2fert,value)
;
***�f�[�^�ǂݍ���
table PCAL_5perc(R,Srcp,co2fert,value)
$offlisting
$ondelim
R,Srcp,co2fert,value
$include ../output/txt/5percentile.csv
$offdelim
$onlisting
;

dPCAL(R,Srcp,co2fert)$(PCAL_5perc(R,Srcp,co2fert,"value"))= PCAL_POP_ABS("SSP2_BaU_NoCC","2050",R,"CALL") - PCAL_5perc(R,Srcp,co2fert,"value");
dPCAL_TOT(R,Srcp,co2fert)=dPCAL(R,Srcp,co2fert)*POP("SSP2_BaU_NoCC","2050",R)*365 *GJ_kcal;

Execute_unload '..\output\gdx\extreme_analysis.gdx'
*dPCAL,dPCAL_TOT

;


